﻿using System.Security.Cryptography;

namespace LogionDemo.Common.Helper
{
	public static class CryptoHelper
	{
		public static string GenerateSalt(int length = 16)
		{
			byte[] salt = new byte[length];
			using (RandomNumberGenerator rng = RandomNumberGenerator.Create())
			{
				rng.GetBytes(salt);
			}
			return Convert.ToBase64String(salt);
		}
	}
}
